package com.bizframework.security.domain.entity;

import java.util.ArrayList;
import java.util.List;

import com.bizframework.core.domain.BaseEntity;

public class Permission extends BaseEntity<String> {

	/**
	 * 权限名称
	 */
	private String name;
	/**
	 * 权限代码
	 */
	private String code;
	/**
	 * 描述
	 */
	private String description;
	/**
	 * 
	 */
	private Permission parentPermission;
	/**
	 * 子权限项
	 */
	private List<Permission> childPermissions;
	/**
	 * 显示顺序
	 */
	private Integer displayOrder;
	
	public Integer getDisplayOrder() {
		return displayOrder;
	}

	public void setDisplayOrder(Integer displayOrder) {
		this.displayOrder = displayOrder;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public List<Permission> getChildPermissions() {
		if (childPermissions == null) {
			childPermissions = new ArrayList<Permission>();
		}
		return childPermissions;
	}

	public void setChildPermissions(List<Permission> childPermissions) {
		this.childPermissions = childPermissions;
	}

	public Permission getParentPermission() {
		return parentPermission;
	}

	public void setParentPermission(Permission parentPermission) {
		this.parentPermission = parentPermission;
	}
}